import sys
import psycopg2

conn = psycopg2.connect("dbname=auigtest user=postgres")
curs = conn.cursor()
curs.execute("select count(*) from auig_test")

rows = curs.fetchall()
for i in range(len(rows)):
    print rows[i][0]

